/*
 * MapManager.h
 *
 *  Created on: 27/06/2011
 *      Author: Rafael
 */

#ifndef MAPMANAGER_H_
#define MAPMANAGER_H_

#include "Map.h"
#include "core/Camera.h"

#include "tilemap.hpp"
#include "entity/ObjectManager.h"
using namespace e2d::graphics;

class MapManager {
private:
	map<int, GameObject*> mapObjects;

	Camera *camera;
	Map *scenery;
	TileMap *tileMap;

protected:
	void GetMapObjects(string tileMapName, ObjectManager *objMg);
	void KillMapObjects(ObjectManager *objMg);
public:
	MapManager(string mapName, ObjectManager *objMg);
	virtual ~MapManager();


	void update(ObjectManager *objMg);
	void Display();
/*
 * Getters and Setters
 */
    Camera *getCamera() const;
    Map *getMap() const;
    TileMap *getTileMap() const;
    void setCamera(Camera *camera);
    void setMap(Map *map);
    void setTileMap(TileMap *tileMap);
    void addMapObject(GameObject *obj);
};

#endif /* MAPMANAGER_H_ */
